/*  FTP_Command.h
 *  for FTP_Command
 *  by vess
 */

#ifndef _FTP_COMMAND_H
#define _FTP_COMMAND_H

#define USER "user"
#define PASS "pass"
#define CWD  "cwd"
#define PORT "port"
#define RETR "retr"
#define TYPE "type"
#define REST "rest"
#define LIST "list"
#define PASV "pasv"

/* Send command USER
 * [in]   server-socket
 * [in]   username
 * [in]   usernamelength
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_USER(SOCKET socket, char *username, int usernamelength);

/* Send command PASS
 * [in]   server-socket
 * [in]   password
 * [in]   passwordlength
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_PASS(SOCKET socket, char *password, int passwordlength);

/* Send command CWD
 * [in]   server-socket
 * [in]   path
 * [in]   pathlength
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_CWD(SOCKET socket, char *path, int pathlength);

/* Send command PORT
 * [in]   server-socket
 * [in]   port
 * [in]   portlength
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_PORT(SOCKET socket, char *port, int portlength);

/* Send command RETR
 * [in]   server-socket
 * [in]   filename
 * [in]   filenamelength
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_RETR(SOCKET socket, char *filename, int filenamelength);

/* Send command TYPE
 * [in]   server-socket
 * [in]   type
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_TYPE(SOCKET socket, char type);

/* Send command REST
 * [in]   server-socket
 * [in]   start position
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_REST(SOCKET socket, long start_position);

/* Send command LIST
 * [in]   server-socket
 * [in]   filename
 * [in]   filenamelength
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_LIST(SOCKET socket, char *filename, int filenamelength);

/* Send command PASV
 * [in]   server-socket
 * [ret]  0 for ok, -1 for errors.
 */
int FTP_PASV(SOCKET socket);

#endif 